import 'package:common_utils/common_utils.dart';
import 'package:get/get.dart';
import 'package:ilab_service_app2/pages/demo/net/state.dart';
import '../../../models/BizType.dart';
import '../../../network/http_request.dart';

class NetLogic extends GetxController {
  final NetState state = NetState();

  List<BizType> bizType = [];

  getData() {
    print("我调用了");
    HttpRequest.get('https://inventory.scionedev.ilabservice.cloud/api/labbase/v1/company/all?account=17826808739&type=saas', success: (w) {
      bizType.clear();
      if (w != null && w is List) {
        for (var element in w) {
          bizType.add(BizType.fromJson(element));
        }
        update();
      }
    });
  }
}
